<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//后台登录页面的路由
Route::get('/admin/public/login','Admin\PublicController@login') -> name('login');
//登录表单的处理
Route::post('/admin/public/checkLogin','Admin\PublicController@checkLogin');
//退出路由
Route::get('/admin/public/logout','Admin\PublicController@logout');

//后台路由
Route::group(['prefix' => 'admin','middleware' => ['auth:admin','checkrbac']],function(){
	//展示后台首页页面
	Route::get('index/index','Admin\IndexController@index');
	Route::get('index/welcome','Admin\IndexController@welcome');

// *******************************管理员路由*************************************************

	//管理员管理模块相关的路由
	Route::get('admin/index','Admin\AdminController@index');//列表页面
	Route::any('admin/add','Admin\AdminController@add');//添加操作
	Route::any('admin/edit','Admin\AdminController@edit');//修改操作
	//针对管理员列表的服务端分页
	Route::get('admin/serverSide/{mark?}','Admin\AdminController@serverSide');
	Route::get('admin/del','Admin\AdminController@del');//删除操作
	Route::get('admin/stop','Admin\AdminController@stop');//禁用
	Route::get('admin/start','Admin\AdminController@start');//启用
	Route::get('admin/deletes','Admin\AdminController@deletes');//批量删除
	Route::get('admin/action','Admin\AdminController@action');
	Route::any('admin/mima', 'Admin\AdminController@mima');//修改管理员密码
	// ***************************管理员路由结束******************************************


	//权限管理的操作
	Route::any('auth/add','Admin\AuthController@add');//添加权限
	Route::any('auth/edit','Admin\AuthController@edit');//添加权限
	Route::get('auth/del','Admin\AuthController@del');//添加权限
	Route::get('auth/index','Admin\AuthController@index');//权限列表
	Route::any('auth/edit','Admin\AuthController@edit');//权限修改
	Route::get('auth/del','Admin\AuthController@del');//权限修改
	Route::get('auth/delAll','Admin\AuthController@delAll');//权限修改
	
	
	

	//角色管理的操作
	Route::get('role/index','Admin\RoleController@index');//角色列表
	Route::any('role/add','Admin\RoleController@add');//角色列表
	Route::any('role/edit','Admin\RoleController@edit');//角色列表
	Route::get('role/del','Admin\RoleController@del');//角色列表
	Route::any('role/assign','Admin\RoleController@assign');//角色权限分配

	//会员管理路由
	Route::get('member/index','Admin\MemberController@index');//列表页面
	Route::any('member/add','Admin\MemberController@add');//添加操作
	Route::any('member/edit','Admin\MemberController@edit');//修改操作
	Route::get('member/getAreasByPid','Admin\MemberController@getAreasByPid');//ajax专用
	
	
	Route::any('member/stat','Admin\MemberController@stat');//修改禁用启用
	Route::any('member/stat2','Admin\MemberController@stat2');//修改禁用启用
	Route::any('member/del','Admin\MemberController@del');//假删除用
	Route::any('member/delMore','Admin\MemberController@delMore');//假删除多个用户
	Route::any('member/chaxun','Admin\MemberController@chaxun');//搜索用户
	Route::any('member/getArea','Admin\MemberController@getArea');//获取具体地址
	
	Route::get('member/delList','Admin\MemberController@delList');//删除的会员列表
	Route::any('member/del2','Admin\MemberController@del2');//会员彻底删除
	Route::any('member/huanyuan','Admin\MemberController@huanyuan');//会员彻底删除
	Route::any('member/delMore2','Admin\MemberController@delMore2');//彻底删除多个用户
	Route::any('member/chaxun2','Admin\MemberController@chaxun2');//在已删除列表搜索用户
	Route::any('member/dengji','Admin\MemberController@dengji');//用户等级管理
	Route::any('member/mRight','Admin\MemberController@mRight');//用户等级改变为普通用户
	Route::any('member/mLeft','Admin\MemberController@mLeft');//用户等级改变为高级会员
	
	
	
	//文件上传

	Route::post('uploader/webuploader1','Admin\UploaderController@webuploader');
	Route::post('uploader/webuploader','Admin\UploaderController@webuploader');
	Route::post('uploader/webuploader2','Admin\UploaderController@webuploader2');
	Route::post('uploader/qiniu','Admin\UploaderController@qiniu');//七牛专用

	//考试管理
	Route::get('test/index','Admin\TestController@index');//试卷列表
	Route::any('test/add','Admin\TestController@add');//试卷增加
	Route::any('test/edit','Admin\TestController@edit');//试卷修改
	Route::get('test/del','Admin\TestController@del');//试卷删除
	
	//试卷管理
	Route::get('paper/index','Admin\PaperController@index');//试题列表
	Route::any('paper/add','Admin\PaperController@add');//试题增加
	Route::any('paper/edit','Admin\PaperController@edit');//试题修改
	Route::get('paper/del','Admin\PaperController@del');//试题删除
	Route::get('paper/export','Admin\PaperController@export');//导出
	Route::any('paper/import','Admin\PaperController@import');//导入

	//国际贸易术语管理
	Route::get('lan/index','Admin\LanController@index');//试卷列表
	Route::any('lan/add','Admin\LanController@add');//试卷增加
	Route::any('lan/edit','Admin\LanController@edit');//试卷修改
	Route::get('lan/del','Admin\LanController@del');//试卷删除

	//国际结算管理
	Route::get('nation/index','Admin\NationController@index');//国际结算列表
	Route::any('nation/add','Admin\NationController@add');//结算增加
	Route::any('nation/edit','Admin\NationController@edit');//结算修改
	Route::get('nation/del','Admin\NationController@del');//结算删除
	Route::get('nation/export','Admin\NationController@export');//导出
	Route::any('nation/import','Admin\NationController@import');//导入

	//单据管理
	Route::get('lists/index','Admin\ListsController@index');//试卷列表
	Route::any('lists/add','Admin\ListsController@add');//试卷增加
	Route::any('lists/edit','Admin\ListsController@edit');//试卷修改
	Route::get('lists/del','Admin\ListsController@del');//试卷删除

	//信函管理
	Route::get('letter/index','Admin\LetterController@index');//信函列表
	Route::any('letter/add','Admin\LetterController@add');//信函增加
	Route::any('letter/edit','Admin\LetterController@edit');//信函修改
	Route::get('letter/del','Admin\LetterController@del');//信函删除

	//国际结算管理
	Route::get('nation/index','Admin\NationController@index');//试卷列表
	Route::any('nation/add','Admin\NationController@add');//试卷增加
	Route::any('nation/edit','Admin\NationController@edit');//试卷修改
	Route::get('nation/del','Admin\NationController@del');//试卷删除	

	//留言管理
	Route::get('leave/index','Admin\LeaveController@index');//留言列表
	Route::any('leave/show/{mark?}','Admin\LeaveController@show');//留言展示
	Route::get('leave/modify','Admin\LeaveController@modify');//留言删

	//分类管理
	Route::get('category/index','Admin\CategoryController@index');//试卷列表
	Route::any('category/add','Admin\CategoryController@add');//试卷增加
	Route::any('category/edit','Admin\CategoryController@edit');//试卷修改
	Route::get('category/del','Admin\CategoryController@del');//试卷删除
	
	//信函管理
	Route::get('lan/index','Admin\LanController@index');//信函列表
	Route::any('lan/add','Admin\LanController@add');//信函增加
	Route::any('lan/edit','Admin\LanController@edit');//信函修改
	Route::get('lan/del','Admin\LanController@del');//信函删除

	//友情链接管理
	Route::get('link/index','Admin\LinkController@index');//展示友情链接列表
	Route::any('link/add','Admin\LinkController@add');//增加友情链接
	Route::get('link/del','Admin\LinkController@del');//删除友情链接
	Route::any('link/edit','Admin\LinkController@edit');//修改友情链接
	

});

// 前台页面

Route::get('/','Home\IndexController@index');	//前台根路由
Route::any('/login','Home\IndexController@login') -> name('weblogin');	//登录页面

Route::group(['prefix' => 'home','middleware' => ['auth:member']],function() {
	
	//考试系统
    Route::any('/exam/index','Home\ExamController@index');	//考试系统主页
    Route::any('/exam/exam','Home\ExamController@exam');	//考试页
    Route::get('/exam/error','Home\ExamController@error');	//错题页
    Route::get('/exam/lishi','Home\ExamController@lishi');	//历史考试页
    Route::get('/exam/test','Home\ExamController@test');	//错题页


    //会员注册，升级
    // Route::get('/member/index','Home\MemberController@index');	//会员注册面
    // Route::get('/member/levelup','Home\MemberController@levelup');	//会员升级面


    //关于我们
    Route::get('/about/index','Home\AboutController@index');	//关于主页
    Route::get('/about/pictures','Home\AboutController@pictures'); //公司相册
    Route::get('/about/abstract','Home\AboutController@abstract'); //公司简介
    Route::get('/about/declare','Home\AboutController@declare'); //免责声明
    Route::get('/about/conceal','Home\AboutController@conceal'); //隐私条款
    Route::get('/about/404','Home\AboutController@f404'); //404

    //国际结算
    Route::get('/nation/index','Home\NationController@index'); //国际结算主页

    //练习系统
    Route::get('/practice/index','Home\PracticeController@index');//练习系统主页
    Route::get('/practice/import','Home\PracticeController@import');//进口公司
    Route::get('/practice/export','Home\PracticeController@export');//出口公司
    Route::get('/practice/bank','Home\PracticeController@bank');//银行
    Route::get('/practice/sea','Home\PracticeController@sea');//海关
    Route::get('/practice/nhelp','Home\PracticeController@nhelp');//新手村
    Route::get('/practice/factory','Home\PracticeController@factory');//新手村

    //教学系统
    Route::get('/letter/index','Home\LetterController@index');//商务函电页
    Route::get('/lists/index','Home\ListsController@index');//商务单证
    Route::get('/lists/fra','Home\ListsController@fra');//商务单证
    Route::get('/lan/index','Home\LanController@index');//贸易术语页
    Route::get('/nation/index','Home\NationController@index');//国际结算页
	Route::get('/leave/index','Home\LeaveController@index');//留言板页
	Route::get('/leave/tump','Home\LeaveController@tump');//留言点赞
	Route::any('/leave/add','Home\LeaveController@add');//留言添加
	
	






});

    //会员注册，升级
    Route::any('/home/member/index','Home\MemberController@index');	//会员注册面
	Route::post('/home/member/sendCode','Home\MemberController@sendCode');//发送验证码
	Route::any('/home/shenji/levelup','Home\ShenJiController@levelup')->middleware('auth:member', 'checkmember');	//会员升级面
    //从登录页跳转过来时是get请求
    Route::any('/home/member/memLogin','Home\MemberController@memLogin')-> name('mlogin');//会员登录页面
    Route::any('/home/member/login','Home\MemberController@login');//会员已登录页面
    Route::any('/home/member/logout','Home\MemberController@logout');//会员已登录页面
    Route::any('/home/member/qiehuan','Home\MemberController@qiehuan');//会员已登录页面
    Route::any('/home/member/editPassword','Home\MemberController@editPassword');//会员修改密码
    Route::any('/home/member/mailTest','Home\MemberController@mailTest');//会员修改密码
    
    //使用微信付款
    Route::get('/home/member/pay','Home\MemberController@pay');

//定义前台路由



